// ignore_for_file: prefer_const_literals_to_create_immutables

import 'package:flutter/material.dart';

class TextPage extends StatefulWidget {
  const TextPage({Key? key}) : super(key: key);

  @override
  _TextPageState createState() => _TextPageState();
}

class _TextPageState extends State<TextPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text(widget.runtimeType.toString()),
      ),
      body: ListView(
        children: [
          const Text(
            "普通Text撒打发阿斯蒂芬阿斯蒂芬阿斯蒂芬暗室逢灯安抚阿斯蒂芬安抚安抚as阿斯蒂芬",
            softWrap: true,
            // overflow: TextOverflow.ellipsis,//后面有点点点
          ), //自动换行
          const Text(
            
            "TextStyleTextStyleTextStyle我我哦阿撒的发生发的1123132",
            textScaleFactor: 3, //缩放倍数
            style: TextStyle(
              color: Colors.black, fontFamily: 'maobi',
              wordSpacing: 10, //这个好像没啥反应
              fontSize: 15,
              backgroundColor: Colors.amber,
              letterSpacing: 5, //单词间隔
              //  height: 0
            ),
          ),
          const Text.rich(
            TextSpan(
              text: '       he candle flickered\n',
              style: TextStyle(fontSize: 14, fontFamily: 'Serif'),
              children: <TextSpan>[
                TextSpan(
                  text: 'T',
                  style: TextStyle(fontSize: 37, fontFamily: 'Serif'),
                ),
                TextSpan(
                  text: 'in the moonlight as\n',
                  style: TextStyle(fontSize: 14, fontFamily: 'Serif'),
                ),
                TextSpan(
                  text: 'Dash the bird fluttered\n',
                  style: TextStyle(fontSize: 14, fontFamily: 'Serif'),
                ),
                TextSpan(
                  text: 'off into the distance.',
                  style: TextStyle(fontSize: 14, fontFamily: 'Serif'),
                ),
              ],
            ),
            strutStyle: StrutStyle(
              fontFamily: 'Serif',
              fontSize: 14,
              forceStrutHeight: true,
            ),
          )
        ],
      ),
    );
  }
}
